<% if @comment.present? %>
    $('#comment_form').replaceWith("<%= j(render :partial =>  'form', :locals => {:comment => @comment, :document => @document}) %>");
//<% else %>
//    ShowNotify("<%= @error %>", "alert");
//<% end %>